package com.stg.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.stg.bean.Permission;
import com.stg.dao.PermissionDao;
import com.stg.service.PermissionService;
@Service("permissionService")
public class PermissionServiceImpl implements PermissionService {

	@Resource
	private PermissionDao permissionDao;
	
	@Override
	public void createPermission(Permission permission) {
		permissionDao.createPermission(permission);
	}

	@Override
	public List<Permission> queryAllPermissions() {
		return permissionDao.queryAllPermissions();
	}

	@Override
	public void updatePermission(Permission permission) {
		permissionDao.updatePermission(permission);
	}

	@Override
	public Permission findPermissionById(Long id) {
		return permissionDao.findPermissionById(id);
	}

	@Override
	public void deletePermission(String permissionName) {
		permissionDao.deletePermission(permissionName);
	}

}
